freeglut (x): Unable to create direct context rendering for window

30 views
Skip to first unread message

Valmor de Almeida

unread,
Aug 27, 2010, 11:38:19 AM8/27/10
to herm...@googlegroups.com

Hello,

Does anyone know what is causing this?

freeglut (x): Unable to create direct context rendering for window 'Mesh'
This may hurt performance.
<< close all views to continue >>
D Closed view "Mesh", window #1
X Error of failed request: GLXBadContextTag
Major opcode of failed request: 152 (GLX)
Minor opcode of failed request: 5 (X_GLXMakeCurrent)
Serial number of failed request: 51
Current serial number in output stream: 51

The code is as follows:

// Display the mesh.
// (100, 0) is the upper left corner position, 600 x 500 is the window
size
MeshView mview("Hello world!", 100, 0, 600, 500);
mview.show(&mesh);

// Wait for the view to be closed.
View::wait();

I do get an image on display but shortly after closing the window the
job crashes.

Thanks,

--
Valmor

Pavel Solin

unread,
Aug 27, 2010, 11:50:27 AM8/27/10
to herm...@googlegroups.com
Valmor, could you push your code to github? I would look at it.

Pavel


--
You received this message because you are subscribed to the Google Groups "hermes2d" group.
To post to this group, send email to herm...@googlegroups.com.
To unsubscribe from this group, send email to hermes2d+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hermes2d?hl=en.




--
Pavel Solin
University of Nevada, Reno
http://hpfem.math.unr.edu/people/pavel/
Hermes project: http://hpfem.org/
FEMhub project: http://femhub.org/

Valmor de Almeida

unread,
Aug 27, 2010, 3:42:18 PM8/27/10
to herm...@googlegroups.com
On 08/27/2010 10:50 AM, Pavel Solin wrote:
> Valmor, could you push your code to github? I would look at it.
>
> Pavel
>
[snip]

Pavel,

I created a fork from your hermes2d repo, cloned, made changes,
committed, and pushed to my repo

-> git push g...@github.com:val-github/hermes2d.git change

Does github send you an e-mail or notice that changes were made?

Thanks,

--
Valmor

Ondrej Certik

unread,
Aug 27, 2010, 2:48:50 PM8/27/10
to herm...@googlegroups.com

No, but you can send a so called "pull request" on github (just click
on that button, you should see it) and then Pavel will get an email.

Ondrej

Valmor de Almeida

unread,
Aug 27, 2010, 4:11:24 PM8/27/10
to herm...@googlegroups.com

A related question. If I do a

git pull git://github.com/val-github/hermes2d.git change

on my repo forked from Pavel's, does this mean that I get all the mods
pushed into Pavel's change branch? Or do I have to pull from his repo on
my local branch and do a push on my github repo?

Still reading about github and git remote...

Thanks,

--
Valmor

Ondrej Certik

unread,
Aug 27, 2010, 3:31:55 PM8/27/10
to herm...@googlegroups.com
On Fri, Aug 27, 2010 at 1:11 PM, Valmor de Almeida <val....@gmail.com> wrote:
> On 08/27/2010 01:48 PM, Ondrej Certik wrote:
>> On Fri, Aug 27, 2010 at 12:42 PM, Valmor de Almeida <val....@gmail.com> wrote:
>>> On 08/27/2010 10:50 AM, Pavel Solin wrote:
>>>> Valmor, could you push your code to github? I would look at it.
>>>>
>>>> Pavel
>>>>
>>> [snip]
>>>
>>> Pavel,
>>>
>>> I created a fork from your hermes2d repo, cloned, made changes,
>>> committed, and pushed to my repo
>>>
>>> ->  git push g...@github.com:val-github/hermes2d.git change
>>>
>>> Does github send you an e-mail or notice that changes were made?
>>
>> No, but you can send a so called "pull request" on github (just click
>> on that button, you should see it) and then Pavel will get an email.
>>
>> Ondrej
>>
>
> A related question. If I do a
>
> git pull git://github.com/val-github/hermes2d.git change
>
> on my repo forked from Pavel's, does this mean that I get all the mods
> pushed into Pavel's change branch? Or do I have to pull from his repo on

Yes.

> my local branch and do a push on my github repo?

github is an unrelated thing --- you can push in there if you want,
then it will also appear online at your github, but you don't have to.

Ondrej

Valmor de Almeida

unread,
Aug 27, 2010, 4:45:39 PM8/27/10
to herm...@googlegroups.com

What is confusing me is that when I look at the commit history on my repo

http://github.com/val-github/hermes2d/commits/change

and compare to Pavel's

http://github.com/solin/hermes2d/commits/change

I don't see the changes in Pavel's reflected on mine. Therefore for my
github repo to have the latest changes, I need to pull from Pavel's into
my local copy and push into my github repo. Is this correct? Or is there
a way to update my github repo (meaning get the new mods from Pavel's)
through the github website?

Thanks,

--
Valmor

Pavel Solin

unread,
Aug 27, 2010, 4:03:42 PM8/27/10
to herm...@googlegroups.com
It works for me:

-------------------------------------------------
This application uses Hermes2D
Hermes2D is a C++ library for rapid
development of adaptive FEM and hp-FEM solvers
developed by the hp-FEM group at UNR
and distributed under the GPL license.
For more details visit http://hpfem.org/.
-------------------------------------------------
I Length of bdry 1 = 2

I Length of bdry 2 = 2

I Length of bdry 3 = 2

I Length of bdry 4 = 2

I Computed perimeter = 8

I Exact perimeter = 8

<< close all views to continue >>
D Closed view "Mesh", window #1

Success!

Pavel Solin

unread,
Aug 27, 2010, 4:04:38 PM8/27/10
to herm...@googlegroups.com

Yes.

Or is there
> a way to update my github repo (meaning get the new mods from Pavel's)
> through the github website?
>
> Thanks,
>
> --
> Valmor
>

Ondrej Certik

unread,
Aug 27, 2010, 4:06:24 PM8/27/10
to herm...@googlegroups.com

There is also a way to do it through the website. But I suggest you do
it from the command line.

Ondrej

Pavel Solin

unread,
Aug 27, 2010, 4:08:32 PM8/27/10
to herm...@googlegroups.com
Valmor, now I pushed your changes into my branch "change",
you should see that on my github page.

Pavel

Valmor de Almeida

unread,
Aug 27, 2010, 5:15:36 PM8/27/10
to herm...@googlegroups.com
[snip]

When possible please try the other CASE in main.cpp. You will need to change

const Cases CASE = SQUARE; // pick the case from the enum above


I wonder whether my version of freeglut is problematic. I am using
freeglut-2.4.0; just guessing from the context rendering error message.

Thanks,

--
Valmor


Valmor de Almeida

unread,
Aug 27, 2010, 6:04:26 PM8/27/10
to herm...@googlegroups.com
On 08/27/2010 03:04 PM, Pavel Solin wrote:
> On Fri, Aug 27, 2010 at 4:45 PM, Valmor de Almeida <val....@gmail.com> wrote:
[snip]

>>
>> I don't see the changes in Pavel's reflected on mine. Therefore for my
>> github repo to have the latest changes, I need to pull from Pavel's into
>> my local copy and push into my github repo. Is this correct?
>
> Yes.
>
[snip]

I should have read this

http://help.github.com/forking/

before creating my github repo. I think I got it now.

Thanks,

--
Valmor

Pavel Solin

unread,
Aug 27, 2010, 5:23:16 PM8/27/10
to herm...@googlegroups.com

Great, this takes some time.
Pavel

Erick

unread,
Aug 27, 2010, 5:32:10 PM8/27/10
to hermes2d
You also didn't have to worry about this forking stuff; i never did.
You could have just pushed your local branch you were working on (say
for example "test" or "change" or whatever) using "git push REMOTENAME
BRANCHNAME" to your remote repo, at say for example
g...@github.com:valmor-at-github/hermes2d.git.

Then when your work is in your remote repo, Dr. Solin could just merge
your work with his branch "change" using fetch, pull, or whatever he
would like. Path of least resistance is the way to do it
nowadays. : )

Erick

On Aug 27, 3:04 pm, Valmor de Almeida <val.hp...@gmail.com> wrote:

Ondrej Certik

unread,
Aug 27, 2010, 5:52:09 PM8/27/10
to herm...@googlegroups.com
On Fri, Aug 27, 2010 at 2:32 PM, Erick <lavi...@sbcglobal.net> wrote:
> You also didn't have to worry about this forking stuff; i never did.
> You could have just pushed your local branch you were working on (say
> for example "test" or "change" or whatever) using "git push REMOTENAME
> BRANCHNAME" to your remote repo, at say for example
> g...@github.com:valmor-at-github/hermes2d.git.
>
> Then when your work is in your remote repo, Dr. Solin could just merge
> your work with his branch "change" using fetch, pull, or whatever he
> would like.  Path of least resistance is the way to do it
> nowadays. :  )

Exactly.

Ondrej

Valmor de Almeida

unread,
Aug 27, 2010, 8:01:22 PM8/27/10
to herm...@googlegroups.com
On 08/27/2010 03:08 PM, Pavel Solin wrote:
> Valmor, now I pushed your changes into my branch "change",
> you should see that on my github page.
>
> Pavel
>

I see it in your commit history:

Merge remote branch 'valmor/change' into valmor

I also updated the upstream repo of my fork

Merge remote branch 'upstream/change' into change

I have added some comments to the domain-perimeter/main.cpp file to test
how this fork push/pull stuff works and you should have received a message.

--
Valmor

Valmor de Almeida

unread,
Aug 27, 2010, 8:25:11 PM8/27/10
to herm...@googlegroups.com
On 08/27/2010 04:32 PM, Erick wrote:
> You also didn't have to worry about this forking stuff; i never did.
> You could have just pushed your local branch you were working on (say
> for example "test" or "change" or whatever) using "git push REMOTENAME
> BRANCHNAME" to your remote repo, at say for example
> g...@github.com:valmor-at-github/hermes2d.git.

Yes. I noticed that you guys typically create a github repo and push a
local clone into it. Then others can merge into their own repo.

I think I understand the difference.

Forking makes things a little more specific. When I forked from Pavel's
change branch and cloned a local repo, I did not have to checkout the
branch. I guess cloning a specific branch would have the same effect
(?). I don't know whether forking facilitates things but my push command
into the fork is simply

git push origin change

and the pull

git pull upstream change

Still trying out these things on a working basis...

Thanks for the feedback.

--
Valmor

[snip]
>
> Erick
>
[snip]

Erick

unread,
Aug 27, 2010, 9:03:06 PM8/27/10
to hermes2d
Cool Valmor; looks like you are learning a lot. Whatever works best
for you and you are comfortable with.

Erick

Pavel Solin

unread,
Aug 28, 2010, 1:17:06 AM8/28/10
to herm...@googlegroups.com
Hi Valmor,
I merged your changes into my branch change. Could
you please disable graphics and remove View::wait(),
these things should not be in a test. We should add an
example that does what the test does now. Typically,
one first creates an example and then a test that makes
sure that the example works correctly.

Thanks!

Pavel

Valmor de Almeida

unread,
Aug 28, 2010, 10:53:20 PM8/28/10
to herm...@googlegroups.com
On 08/28/2010 12:17 AM, Pavel Solin wrote:
> Hi Valmor,
> I merged your changes into my branch change. Could
> you please disable graphics and remove View::wait(),
> these things should not be in a test. We should add an
> example that does what the test does now. Typically,
> one first creates an example and then a test that makes
> sure that the example works correctly.
>
> Thanks!
>
> Pavel
>
[snip]
>

Will do it. A pull request from my fork of your change branch will be
sent to you. Yes I have been wondering about the logic of tests and
examples. There is a test/, test/example, test/tutorial.

--
Valmor

Pavel Solin

unread,
Aug 28, 2010, 10:01:12 PM8/28/10
to herm...@googlegroups.com
> examples. There is a tests/, tests/example, tests/tutorial.

Yes, and also tests/benchmarks/. These tests are in groups corresponding to
the directories tutorial, benchmarks/, and examples/. Plus there are
additional tests for the mesh, projections, shape functions, etc.

Pavel


>
> --
> Valmor

Erick

unread,
Aug 27, 2010, 8:59:43 PM8/27/10
to hermes2d
Cool Valmor; looks like your learning a lot. Whatever works best for
you and you are comfortable with.

Erick

Reply all
Reply to author
Forward
0 new messages