jogl

Jogl Shader programming

空扰寡人 提交于 2019-11-30 13:03:24
问题 I just started Shader programming(GLSL) and created a few with RenderMonkey. Now I want to use this Shaders in my java code. Are there any simple examples of how I do that? 回答1: I have found a very simple example int v = gl.glCreateShader(GL.GL_VERTEX_SHADER); int f = gl.glCreateShader(GL.GL_FRAGMENT_SHADER); BufferedReader brv = new BufferedReader(new FileReader("vertexshader.glsl")); String vsrc = ""; String line; while ((line=brv.readLine()) != null) { vsrc += line + "\n"; } gl

What are the steps necessary to render my scene to a Framebuffer Object(FBO) and then render that FBO to the screen?

北战南征 提交于 2019-11-30 09:10:26
I've got a fairly complicated scene with many GL_POINTS that I need to render. The scene will be largely static, so I'd like to render it to a Framebuffer Object and then only update that FBO when my scene actually changes. I'd then like to render the FBO to the screen each frame. I've found examples that render an FBO into a texture. I've found examples that render an FBO into a RenderBuffer (still not quite sure what that is). I'm not sure what the steps are to achieve this. Do I need to render to a texture and the draw the texture to the screen? Can you please enumerate the steps (ideally

3d modelling loading , updating and rendering in java

江枫思渺然 提交于 2019-11-29 15:19:30
i am new to java 3d. i have encountered a situation like , i want to load ready made developed 3d model of any object [as an example shoe] developed in 3d modeling software like 3d studio max or Maya in my java program , update its texture or color properties etc. then render it and then display the updated model to the end user. so i am asking all the 3d experts how should i proceed ahead to accomplish my goal ? which input should i load into my program ? how can i update the loaded model , render it and display the updated model to the end user ? in simple story , i want to give my users

clang: error: unsupported option '-static-libgcc' on Mac OSX Mavericks

让人想犯罪 __ 提交于 2019-11-29 13:44:51
I am trying to compile jogl from source on my Mac Mini with Mac OSX mavericks, but getting clang: error: unsupported option '-static-libgcc' on Mac OSX Mavericks I have XCode 5.0.1 (5A2053) and installed the Command line tools for OSX Mavericks Any hints on how to fix this issue The command called gcc is not really GCC on Mavericks. It's just a copy of Clang: $ gcc --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/c++/4.2.1 Apple

Recommended 3D model type for in-game character model, loaded manually?

隐身守侯 提交于 2019-11-29 04:31:53
I'm writing a game in JOGL and need to represent the in-game character. I plan to use skeletal animation for the character movements, and of course the character will be skinned. I can't seem to find any good model loaders for JOGL so I plan to load the filetype myself, based on specs or something. I also plan to use Blender as my 3D modeler, so some type that exists in there would be best. What filetype do you recommend I use? .blend? .x, .3ds, .md2/3/5, ...?? Remember I'd like something with a clear defined format so that I can write the loader without having to deobfuscate some random file

Loading an .obj with JOGL

喜你入骨 提交于 2019-11-28 12:22:39
I have found may tutorials on loading an obj, but nothing on how to load it and use it with java, anyone have links to any useful tutorials? The closest that I could find were: JOGL-ES Chapter 2 - Loading OBJ Models OBJ File Format OBJ Loader, Renderer Independent Keep in mind that JOGL is a very low-level API. Some of the higher-level APIs (JMonkeyEngine, and Java3D) have sophisticated APIs built in for handling this sort of thing. With JOGL, you will be doing much of the work yourself. Obviously, there are advantages and disadvantages to each approach. Not a tutorial, but how about some

3d modelling loading , updating and rendering in java

老子叫甜甜 提交于 2019-11-28 09:22:28
问题 i am new to java 3d. i have encountered a situation like , i want to load ready made developed 3d model of any object [as an example shoe] developed in 3d modeling software like 3d studio max or Maya in my java program , update its texture or color properties etc. then render it and then display the updated model to the end user. so i am asking all the 3d experts how should i proceed ahead to accomplish my goal ? which input should i load into my program ? how can i update the loaded model ,

clang: error: unsupported option '-static-libgcc' on Mac OSX Mavericks

戏子无情 提交于 2019-11-28 07:39:04
问题 I am trying to compile jogl from source on my Mac Mini with Mac OSX mavericks, but getting clang: error: unsupported option '-static-libgcc' on Mac OSX Mavericks I have XCode 5.0.1 (5A2053) and installed the Command line tools for OSX Mavericks Any hints on how to fix this issue 回答1: The command called gcc is not really GCC on Mavericks. It's just a copy of Clang: $ gcc --version Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications

Using OpenGL in Matlab to get depth buffer

这一生的挚爱 提交于 2019-11-27 19:11:31
Ive asked a similar question before and didnt manage to find a direct answer . Could someone provide sample code for extracting the depth buffer of the rendering of an object into a figure in Matlab? So lets say I load an obj file or even just a simple surf call, render it and now want to get to its depth buffer then what code will do that for me using both Matlab and OpenGL. I.e. how do I set this up and then access the actual data? I essentially want to be able to use Matlabs powerful plotting functions and then be able to access the underlying graphics context for getting the depth buffer

Recommended 3D model type for in-game character model, loaded manually?

僤鯓⒐⒋嵵緔 提交于 2019-11-27 18:19:56
问题 I'm writing a game in JOGL and need to represent the in-game character. I plan to use skeletal animation for the character movements, and of course the character will be skinned. I can't seem to find any good model loaders for JOGL so I plan to load the filetype myself, based on specs or something. I also plan to use Blender as my 3D modeler, so some type that exists in there would be best. What filetype do you recommend I use? .blend? .x, .3ds, .md2/3/5, ...?? Remember I'd like something