Commit bde84f59 authored by Filip Reaboi's avatar Filip Reaboi
Browse files

ForTISS changed to fortiss

@Id: deleted

refs 3241
parent 6ae5154d
...@@ -43,7 +43,7 @@ import java.nio.*; ...@@ -43,7 +43,7 @@ import java.nio.*;
* @author cix_foo <cix_foo@users.sourceforge.net> * @author cix_foo <cix_foo@users.sourceforge.net>
* @author elias_naur <elias_naur@users.sourceforge.net> * @author elias_naur <elias_naur@users.sourceforge.net>
* @version $Revision$ * @version $Revision$
* $Id$ * | |
*/ */
public class BufferChecks { public class BufferChecks {
/** Static methods only! */ /** Static methods only! */
......
...@@ -44,16 +44,17 @@ import java.nio.ShortBuffer; ...@@ -44,16 +44,17 @@ import java.nio.ShortBuffer;
/** /**
* Some often-used Buffer code for creating native buffers of the appropriate size. * Some often-used Buffer code for creating native buffers of the appropriate size.
* *
* @author $Author$ * @author hoelzl
* @version $Revision$ * | |
* $Id$
*/ */
public final class BufferUtils { public final class BufferUtils {
/** /**
* Construct a direct native-ordered bytebuffer with the specified size. * Construct a direct native-ordered bytebuffer with the specified size.
* @param size The size, in bytes *
* @param size
* The size, in bytes
* @return a ByteBuffer * @return a ByteBuffer
*/ */
public static ByteBuffer createByteBuffer(int size) { public static ByteBuffer createByteBuffer(int size) {
...@@ -63,7 +64,9 @@ public final class BufferUtils { ...@@ -63,7 +64,9 @@ public final class BufferUtils {
/** /**
* Construct a direct native-order shortbuffer with the specified number * Construct a direct native-order shortbuffer with the specified number
* of elements. * of elements.
* @param size The size, in shorts *
* @param size
* The size, in shorts
* @return a ShortBuffer * @return a ShortBuffer
*/ */
public static ShortBuffer createShortBuffer(int size) { public static ShortBuffer createShortBuffer(int size) {
...@@ -73,7 +76,9 @@ public final class BufferUtils { ...@@ -73,7 +76,9 @@ public final class BufferUtils {
/** /**
* Construct a direct native-order charbuffer with the specified number * Construct a direct native-order charbuffer with the specified number
* of elements. * of elements.
* @param size The size, in chars *
* @param size
* The size, in chars
* @return an CharBuffer * @return an CharBuffer
*/ */
public static CharBuffer createCharBuffer(int size) { public static CharBuffer createCharBuffer(int size) {
...@@ -83,7 +88,9 @@ public final class BufferUtils { ...@@ -83,7 +88,9 @@ public final class BufferUtils {
/** /**
* Construct a direct native-order intbuffer with the specified number * Construct a direct native-order intbuffer with the specified number
* of elements. * of elements.
* @param size The size, in ints *
* @param size
* The size, in ints
* @return an IntBuffer * @return an IntBuffer
*/ */
public static IntBuffer createIntBuffer(int size) { public static IntBuffer createIntBuffer(int size) {
...@@ -93,7 +100,9 @@ public final class BufferUtils { ...@@ -93,7 +100,9 @@ public final class BufferUtils {
/** /**
* Construct a direct native-order longbuffer with the specified number * Construct a direct native-order longbuffer with the specified number
* of elements. * of elements.
* @param size The size, in longs *
* @param size
* The size, in longs
* @return an LongBuffer * @return an LongBuffer
*/ */
public static LongBuffer createLongBuffer(int size) { public static LongBuffer createLongBuffer(int size) {
...@@ -103,7 +112,9 @@ public final class BufferUtils { ...@@ -103,7 +112,9 @@ public final class BufferUtils {
/** /**
* Construct a direct native-order floatbuffer with the specified number * Construct a direct native-order floatbuffer with the specified number
* of elements. * of elements.
* @param size The size, in floats *
* @param size
* The size, in floats
* @return a FloatBuffer * @return a FloatBuffer
*/ */
public static FloatBuffer createFloatBuffer(int size) { public static FloatBuffer createFloatBuffer(int size) {
...@@ -113,7 +124,9 @@ public final class BufferUtils { ...@@ -113,7 +124,9 @@ public final class BufferUtils {
/** /**
* Construct a direct native-order doublebuffer with the specified number * Construct a direct native-order doublebuffer with the specified number
* of elements. * of elements.
* @param size The size, in floats *
* @param size
* The size, in floats
* @return a FloatBuffer * @return a FloatBuffer
*/ */
public static DoubleBuffer createDoubleBuffer(int size) { public static DoubleBuffer createDoubleBuffer(int size) {
...@@ -123,7 +136,9 @@ public final class BufferUtils { ...@@ -123,7 +136,9 @@ public final class BufferUtils {
/** /**
* Construct a PointerBuffer with the specified number * Construct a PointerBuffer with the specified number
* of elements. * of elements.
* @param size The size, in memory addresses *
* @param size
* The size, in memory addresses
* @return a PointerBuffer * @return a PointerBuffer
*/ */
public static PointerBuffer createPointerBuffer(int size) { public static PointerBuffer createPointerBuffer(int size) {
...@@ -134,13 +149,13 @@ public final class BufferUtils { ...@@ -134,13 +149,13 @@ public final class BufferUtils {
* @return n, where buffer_element_size=2^n. * @return n, where buffer_element_size=2^n.
*/ */
public static int getElementSizeExponent(Buffer buf) { public static int getElementSizeExponent(Buffer buf) {
if (buf instanceof ByteBuffer) if(buf instanceof ByteBuffer)
return 0; return 0;
else if (buf instanceof ShortBuffer || buf instanceof CharBuffer) else if(buf instanceof ShortBuffer || buf instanceof CharBuffer)
return 1; return 1;
else if (buf instanceof FloatBuffer || buf instanceof IntBuffer) else if(buf instanceof FloatBuffer || buf instanceof IntBuffer)
return 2; return 2;
else if (buf instanceof LongBuffer || buf instanceof DoubleBuffer) else if(buf instanceof LongBuffer || buf instanceof DoubleBuffer)
return 3; return 3;
else else
throw new IllegalStateException("Unsupported buffer type: " + buf); throw new IllegalStateException("Unsupported buffer type: " + buf);
...@@ -149,6 +164,7 @@ public final class BufferUtils { ...@@ -149,6 +164,7 @@ public final class BufferUtils {
/** /**
* A helper function which is used to get the byte offset in an arbitrary buffer * A helper function which is used to get the byte offset in an arbitrary buffer
* based on its position * based on its position
*
* @return the position of the buffer, in BYTES * @return the position of the buffer, in BYTES
*/ */
public static int getOffset(Buffer buffer) { public static int getOffset(Buffer buffer) {
...@@ -157,37 +173,37 @@ public final class BufferUtils { ...@@ -157,37 +173,37 @@ public final class BufferUtils {
/** Fill buffer with zeros from position to remaining */ /** Fill buffer with zeros from position to remaining */
public static void zeroBuffer(ByteBuffer b) { public static void zeroBuffer(ByteBuffer b) {
zeroBuffer0(b, b.position(), b.remaining()); zeroBuffer0(b, b.position(), b.remaining());
} }
/** Fill buffer with zeros from position to remaining */ /** Fill buffer with zeros from position to remaining */
public static void zeroBuffer(ShortBuffer b) { public static void zeroBuffer(ShortBuffer b) {
zeroBuffer0(b, b.position()*2L, b.remaining()*2L); zeroBuffer0(b, b.position() * 2L, b.remaining() * 2L);
} }
/** Fill buffer with zeros from position to remaining */ /** Fill buffer with zeros from position to remaining */
public static void zeroBuffer(CharBuffer b) { public static void zeroBuffer(CharBuffer b) {
zeroBuffer0(b, b.position()*2L, b.remaining()*2L); zeroBuffer0(b, b.position() * 2L, b.remaining() * 2L);
} }
/** Fill buffer with zeros from position to remaining */ /** Fill buffer with zeros from position to remaining */
public static void zeroBuffer(IntBuffer b) { public static void zeroBuffer(IntBuffer b) {
zeroBuffer0(b, b.position()*4L, b.remaining()*4L); zeroBuffer0(b, b.position() * 4L, b.remaining() * 4L);
} }
/** Fill buffer with zeros from position to remaining */ /** Fill buffer with zeros from position to remaining */
public static void zeroBuffer(FloatBuffer b) { public static void zeroBuffer(FloatBuffer b) {
zeroBuffer0(b, b.position()*4L, b.remaining()*4L); zeroBuffer0(b, b.position() * 4L, b.remaining() * 4L);
} }
/** Fill buffer with zeros from position to remaining */ /** Fill buffer with zeros from position to remaining */
public static void zeroBuffer(LongBuffer b) { public static void zeroBuffer(LongBuffer b) {
zeroBuffer0(b, b.position()*8L, b.remaining()*8L); zeroBuffer0(b, b.position() * 8L, b.remaining() * 8L);
} }
/** Fill buffer with zeros from position to remaining */ /** Fill buffer with zeros from position to remaining */
public static void zeroBuffer(DoubleBuffer b) { public static void zeroBuffer(DoubleBuffer b) {
zeroBuffer0(b, b.position()*8L, b.remaining()*8L); zeroBuffer0(b, b.position() * 8L, b.remaining() * 8L);
} }
/** Fill buffer with zeros from position to remaining */ /** Fill buffer with zeros from position to remaining */
...@@ -196,7 +212,8 @@ public final class BufferUtils { ...@@ -196,7 +212,8 @@ public final class BufferUtils {
/** /**
* Returns the memory address of the specified buffer. * Returns the memory address of the specified buffer.
* *
* @param buffer the buffer * @param buffer
* the buffer
* *
* @return the memory address * @return the memory address
*/ */
......
...@@ -39,7 +39,7 @@ package org.lwjglx; ...@@ -39,7 +39,7 @@ package org.lwjglx;
* *
* @author Brian Matzon <brian@matzon.dk> * @author Brian Matzon <brian@matzon.dk>
* @version $Revision$ * @version $Revision$
* $Id$ * | |
*/ */
public class LWJGLException extends Exception { public class LWJGLException extends Exception {
......
...@@ -49,7 +49,7 @@ import java.util.*; ...@@ -49,7 +49,7 @@ import java.util.*;
* *
* @author Brian Matzon <brian@matzon.dk> * @author Brian Matzon <brian@matzon.dk>
* @version $Revision$ * @version $Revision$
* $Id$ * | |
*/ */
public class LWJGLUtil { public class LWJGLUtil {
public static final int PLATFORM_LINUX = 1; public static final int PLATFORM_LINUX = 1;
......
...@@ -47,7 +47,7 @@ import org.lwjglx.LWJGLException; ...@@ -47,7 +47,7 @@ import org.lwjglx.LWJGLException;
* *
* @author elias_naur <elias_naur@users.sourceforge.net> * @author elias_naur <elias_naur@users.sourceforge.net>
* @version $Revision$ * @version $Revision$
* $Id$ * | |
*/ */
public class Cursor { public class Cursor {
......
...@@ -47,7 +47,7 @@ import org.lwjgl.BufferUtils; ...@@ -47,7 +47,7 @@ import org.lwjgl.BufferUtils;
* *
* @author Brian Matzon <brian@matzon.dk> * @author Brian Matzon <brian@matzon.dk>
* @version $Revision$ * @version $Revision$
* $Id$ * | |
*/ */
public final class ALCcontext { public final class ALCcontext {
......
...@@ -45,7 +45,7 @@ import java.util.HashMap; ...@@ -45,7 +45,7 @@ import java.util.HashMap;
* *
* @author Brian Matzon <brian@matzon.dk> * @author Brian Matzon <brian@matzon.dk>
* @version $Revision$ * @version $Revision$
* $Id$ * | |
*/ */
public final class ALCdevice { public final class ALCdevice {
......
...@@ -38,7 +38,7 @@ package org.lwjglx.openal; ...@@ -38,7 +38,7 @@ package org.lwjglx.openal;
* *
* @author Brian Matzon <brian@matzon.dk> * @author Brian Matzon <brian@matzon.dk>
* @version $Revision$ * @version $Revision$
* $Id$ * | |
*/ */
public class OpenALException extends RuntimeException { public class OpenALException extends RuntimeException {
......
...@@ -43,7 +43,7 @@ import org.lwjglx.PointerBuffer; ...@@ -43,7 +43,7 @@ import org.lwjglx.PointerBuffer;
* *
* @author elias_naur <elias_naur@users.sourceforge.net> * @author elias_naur <elias_naur@users.sourceforge.net>
* @version $Revision$ * @version $Revision$
* $Id$ * | |
*/ */
final class ContextGL implements Context { final class ContextGL implements Context {
......
...@@ -39,7 +39,7 @@ package org.lwjglx.opengl; ...@@ -39,7 +39,7 @@ package org.lwjglx.opengl;
* *
* @author cix_foo <cix_foo@users.sourceforge.net> * @author cix_foo <cix_foo@users.sourceforge.net>
* @version $Revision$ * @version $Revision$
* $Id$ * | |
*/ */
public final class DisplayMode { public final class DisplayMode {
......
...@@ -37,7 +37,7 @@ package org.lwjglx.opengl; ...@@ -37,7 +37,7 @@ package org.lwjglx.opengl;
* *
* @author cix_foo <cix_foo@users.sourceforge.net> * @author cix_foo <cix_foo@users.sourceforge.net>
* @version $Revision$ * @version $Revision$
* $Id$ * | |
*/ */
public class OpenGLException extends RuntimeException { public class OpenGLException extends RuntimeException {
......
...@@ -46,7 +46,7 @@ import org.lwjglx.Sys; ...@@ -46,7 +46,7 @@ import org.lwjglx.Sys;
* *
* @author elias_naur <elias_naur@users.sourceforge.net> * @author elias_naur <elias_naur@users.sourceforge.net>
* @version $Revision$ * @version $Revision$
* $Id$ * | |
*/ */
public final class Pbuffer extends DrawableGL { public final class Pbuffer extends DrawableGL {
/** /**
......
...@@ -40,7 +40,7 @@ import org.lwjglx.LWJGLUtil; ...@@ -40,7 +40,7 @@ import org.lwjglx.LWJGLUtil;
* *
* @author elias_naur <elias_naur@users.sourceforge.net> * @author elias_naur <elias_naur@users.sourceforge.net>
* @version $Revision$ * @version $Revision$
* $Id$ * | |
*/ */
abstract class PeerInfo { abstract class PeerInfo {
private final ByteBuffer handle; private final ByteBuffer handle;
......
...@@ -42,9 +42,9 @@ import org.lwjglx.opengl.DisplayMode; ...@@ -42,9 +42,9 @@ import org.lwjglx.opengl.DisplayMode;
/** /**
* Display initialization utility, that can be used to find display modes and pick * Display initialization utility, that can be used to find display modes and pick
* one for you based on your criteria. * one for you based on your criteria.
* @author $Author$ *
* @version $Revision$ * @author hoelzl
* $Id$ * | |
*/ */
public final class Display { public final class Display {
...@@ -54,51 +54,58 @@ public final class Display { ...@@ -54,51 +54,58 @@ public final class Display {
* Determine the available display modes that match the specified minimum and maximum criteria. * Determine the available display modes that match the specified minimum and maximum criteria.
* If any given criterium is specified as -1 then it is ignored. * If any given criterium is specified as -1 then it is ignored.
* *
* @param minWidth the minimum display resolution in pixels * @param minWidth
* @param minHeight the minimum display resolution in pixels * the minimum display resolution in pixels
* @param maxWidth the maximum display resolution in pixels * @param minHeight
* @param maxHeight the maximum display resolution in pixels * the minimum display resolution in pixels
* @param minBPP the minimum bit depth per pixel * @param maxWidth
* @param maxBPP the maximum bit depth per pixel * the maximum display resolution in pixels
* @param minFreq the minimum display frequency in Hz * @param maxHeight
* @param maxFreq the maximum display frequency in Hz * the maximum display resolution in pixels
* @param minBPP
* the minimum bit depth per pixel
* @param maxBPP
* the maximum bit depth per pixel
* @param minFreq
* the minimum display frequency in Hz
* @param maxFreq
* the maximum display frequency in Hz
* @return an array of matching display modes * @return an array of matching display modes
*/ */
public static DisplayMode[] getAvailableDisplayModes(int minWidth, int minHeight, int maxWidth, int maxHeight, int minBPP, int maxBPP, public static DisplayMode[] getAvailableDisplayModes(int minWidth, int minHeight, int maxWidth,
int minFreq, int maxFreq) throws LWJGLException int maxHeight, int minBPP, int maxBPP, int minFreq, int maxFreq) throws LWJGLException {
{
// First get the available display modes // First get the available display modes
DisplayMode[] modes = org.lwjglx.opengl.Display.getAvailableDisplayModes(); DisplayMode[] modes = org.lwjglx.opengl.Display.getAvailableDisplayModes();
if (LWJGLUtil.DEBUG || DEBUG) { if(LWJGLUtil.DEBUG || DEBUG) {
System.out.println("Available screen modes:"); System.out.println("Available screen modes:");
for ( DisplayMode mode : modes ) { for(DisplayMode mode : modes) {
System.out.println(mode); System.out.println(mode);
} }
} }
ArrayList<DisplayMode> matches = new ArrayList<DisplayMode>(modes.length); ArrayList<DisplayMode> matches = new ArrayList<DisplayMode>(modes.length);
for (int i = 0; i < modes.length; i ++) { for(int i = 0; i < modes.length; i++) {
assert modes[i] != null : ""+i+" "+modes.length; assert modes[i] != null : "" + i + " " + modes.length;
if (minWidth != -1 && modes[i].getWidth() < minWidth) if(minWidth != -1 && modes[i].getWidth() < minWidth)
continue; continue;
if (maxWidth != -1 && modes[i].getWidth() > maxWidth) if(maxWidth != -1 && modes[i].getWidth() > maxWidth)
continue; continue;
if (minHeight != -1 && modes[i].getHeight() < minHeight) if(minHeight != -1 && modes[i].getHeight() < minHeight)
continue; continue;
if (maxHeight != -1 && modes[i].getHeight() > maxHeight) if(maxHeight != -1 && modes[i].getHeight() > maxHeight)
continue; continue;
if (minBPP != -1 && modes[i].getBitsPerPixel() < minBPP) if(minBPP != -1 && modes[i].getBitsPerPixel() < minBPP)
continue; continue;
if (maxBPP != -1 && modes[i].getBitsPerPixel() > maxBPP) if(maxBPP != -1 && modes[i].getBitsPerPixel() > maxBPP)
continue; continue;
//if (modes[i].bpp == 24) // if (modes[i].bpp == 24)
// continue; // continue;
if (modes[i].getFrequency() != 0) { if(modes[i].getFrequency() != 0) {
if (minFreq != -1 && modes[i].getFrequency() < minFreq) if(minFreq != -1 && modes[i].getFrequency() < minFreq)
continue; continue;
if (maxFreq != -1 && modes[i].getFrequency() > maxFreq) if(maxFreq != -1 && modes[i].getFrequency() > maxFreq)
continue; continue;
} }
matches.add(modes[i]); matches.add(modes[i]);
...@@ -106,9 +113,9 @@ public final class Display { ...@@ -106,9 +113,9 @@ public final class Display {
DisplayMode[] ret = new DisplayMode[matches.size()]; DisplayMode[] ret = new DisplayMode[matches.size()];
matches.toArray(ret); matches.toArray(ret);
if (LWJGLUtil.DEBUG && DEBUG) { if(LWJGLUtil.DEBUG && DEBUG) {
System.out.println("Filtered screen modes:"); System.out.println("Filtered screen modes:");
for ( DisplayMode mode : ret ) { for(DisplayMode mode : ret) {
System.out.println(mode); System.out.println(mode);
} }
} }
...@@ -118,44 +125,56 @@ public final class Display { ...@@ -118,44 +125,56 @@ public final class Display {
/** /**
* Create the display by choosing from a list of display modes based on an order of preference.