Jump to content
  • Advertisement
Sign in to follow this  
LargeJ

OpenGL Using VBO's before window is created using JOGL

This topic is 2610 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all,

I am working on an application that reads in a collection of 3d models. Because the application is written in java, I decided to use JOGL to render the models to a window when the user presses "view model". I know how to create an opengl context by creating a GLCanvas and attaching a listener. In the init-method I can load in the models using VBO.

However, what I want to do is initialize opengl at the start of the application, so that I can load in the models on the GPU. When the user presses the view mesh button, the window should be created containing the GLCanvas and render the selected model. This prevents me from storing all vertex and normal data and just store one or two id's.

So, is there any way to obtain a handle to opengl without creating a GLCanvas?
[Or is hiding the window the most efficient way to go? I don't wanna ruin processor time by rendering/looping something that isn't visible]

Share this post


Link to post
Share on other sites
Advertisement
You need to have a context and to have a context you need to create a window. You can make it hidden if you want.

Share this post


Link to post
Share on other sites
You can always just create the window but not render anything to it until the user clicks that button, Just becuase the model is loaded in the VBO doesnt mean you have to render it. <BR><BR>Alternitively if you realy dont want the window before the user clicks the button just load the model data into buffers in the correct format and keep it in memory. Then when the user wants to see the model create the window and just load that data into the VBO. It should stil be pretty much instant. Loading the model into the memory buffer from a flat file is the most time consuming part.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!