![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Feb 2006
Posts: 2
Rep Power: 0
![]() |
OpenGL, Java?
Well, hello everybody.
I'm a very experienced C++ programmer and know what I'm doing over there. However, I haven't played with OpenGL or even touched Java before. I am taking a sort-of redundant programming course and my instructor wants me to do independent study instead of going to class. The project I have pitched involves me needing to write a PNG in Java to OpenGL or some other means of displaying graphics. I may be able to persuade my instructor to let me use C++ (that would definitely be my preference). Since all that I need to do is send a PNG image straight to OpenGL or something similar every time I parse the PNG, I do not need to know that much about OpenGL's library. However, I still don't know how to set this up; would anyone be able to refer me to a good tutorial for some sort of system to use? Again, I don't need to use OpenGL; just something that I can find tutorials for to learn, that will get the job done. If there is something else you would suggest, a tutorial will be highly appreciated. ![]() Thanks for your time! |
|
|
|
|
|
#2 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Why would you use a 3D graphics library to display a static png? It's been a while since I've touched Swing, but couldn't you use the ImageIcon widget?
|
|
|
|
|
|
#3 |
|
Newbie
Join Date: Feb 2006
Posts: 2
Rep Power: 0
![]() |
Well, mainly because the thing I am creating will be open source, modifiable, and people may want to adapt it to be 3d. The PNG itself is a graphical output for a cellular automaton (well, it's also an input, not going into too many details) and some people may want to show the cellular activity as a torroidal shape or using various other methods.
But at any rate, that'd probably do my job just fine, can you suggest a tutorial? I have not played with it before. |
|
|
|
|
|
#4 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
Well... OpenGL seems a little like overkill. You have to initiate the library, create a viewing matrix, configure the texture settings, load the png onto a texture, create a quad, texture the quad with your png-texture- Well, suffice to say that it's not a trivial thing to do.
As for Swing tutorials; it has been a while since I've looked at Swing. But a quick search on google reveals this example, which includes a bit of code that displays an image with ImageIcon and JLabel. Any more general tutorials you can probably find just as well as I can ![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|